1. Field of the Invention
The present invention relates to a nonvolatile memory circuit that does not lose a stored logical state even after the power is turned off. The present invention also relates to an electronic device including the memory circuit.
2. Description of the Related Art
Signal processing circuits such as central processing units (CPUs) vary in structure depending on the intended use. A signal processing circuit generally has a main memory for storing data or program and other memory circuits such as a register and a cache memory.
In a memory circuit such as a register or a cache memory, data reading and data writing need to be performed at higher speed than in a main memory. Thus, in general, a flip-flop circuit is used as a register, and a static random access memory (SRAM) or the like is used as a cache memory. In other words, such a register, a cache memory, and the like are volatile memory circuits which lose data after the application of source voltage is stopped.
In order to reduce power consumption, a method has been suggested in which the application of source voltage to a signal processing circuit is temporarily stopped while input/output of data is not conducted. In the method, a nonvolatile memory circuit is located on the periphery of a volatile memory circuit such as a register or a cache memory, and the data is temporarily stored in the nonvolatile memory circuit. Thus, the register, the cache memory, or the like in the signal processing circuit holds the data even while the application of source voltage is stopped (see Patent Document 1, for example).
In the case where the application of source voltage to a signal processing circuit is stopped for a long time, data in a volatile memory circuit is transferred to an external storage device such as a hard disk or a flash memory before the application of source voltage is stopped, so that the data can be prevented from being lost.